import 'package:flutter/material.dart';

import 'test.dart';

class NativePluginPage extends StatefulWidget {
  @override
  _NativePluginPageState createState() => _NativePluginPageState();
}

class _NativePluginPageState extends State<NativePluginPage> {
  var _testNative = TestNative();

  @override
  void initState() {
    _testNative.init();
    super.initState();
  }
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text("native plugin test2"),
      ),
      body: FlatButton(onPressed: _toast, child: Text("toast"),),
    );
  }

  void _toast() {
    _testNative.nativeToast();
  }
}
